package com.yt.sys.service;

import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.BeanUtils;
import javax.annotation.Resource;
import com.yt.sys.common.config.YmlConfig;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.yt.sys.mapper.EmpRatingStatsMapper;
import com.yt.sys.models.service.IEmpRatingStatsService;
import com.yt.sys.models.bo.EmpRatingStatsSaveBO;
import com.yt.sys.models.dto.EmpRatingStatsDTO;

/**
 * 员工星级控制器
 *
 * @author yzz
 * @Date 2025-09-17 14:31:15
 */
@DubboService
public class EmpRatingStatsServiceImpl extends ServiceImpl<EmpRatingStatsMapper, EmpRatingStatsDTO> implements IEmpRatingStatsService{

    @Resource
    private YmlConfig ymlConfig;

    @Override
    public boolean add(EmpRatingStatsSaveBO saveBO) {
        EmpRatingStatsDTO dto = new EmpRatingStatsDTO();
        BeanUtils.copyProperties(saveBO,dto);
        Long id = ymlConfig.getPkId();
        dto.setId(id);
        return this.insert(dto);
    }
}
